package g.beny.framework.log;

import g.beny.framework.log.annotation.DbLog;

import java.lang.reflect.Method;

import org.nutz.aop.interceptor.AbstractMethodInterceptor;

/**
 * 操作日志记录器
 * 
 * @ClassName DBLogInterceptor
 * @Description TODO
 * @author gson
 * @date 2012-8-17 下午9:33:15
 * 
 */
public class DBLogInterceptor extends AbstractMethodInterceptor {

	public Object afterInvoke(Object obj, Object returnObj, Method method,Object... args) {
		DbLog dlog = method.getAnnotation(DbLog.class);
		if( dlog != null){
			String value = dlog.value();
			System.out.println(value);
		}
		return returnObj;
	}
}
